package com.hkx.smipleemps.service;

import com.hkx.smipleemps.common.domain.Admin;
import com.hkx.smipleemps.dao.AdminDao;
import com.hkx.smipleemps.dao.AdminDaoImpl;

public class AdminServiceImpl implements AdminService {
    // 服务层 注入  dao层
    AdminDao adminDao = new AdminDaoImpl();

    public Admin findAdminByName(String name) {
        return adminDao.selectAdminByName(name);
    }

    @Override
    public Admin getAdminById(Integer id) {
        //alt+ 回车
        return adminDao.selectAdminById(id);
    }

    @Override
    public void updateAdmin(Admin admin) {
        adminDao.updateAdmin(admin);
    }
}
